// 开启物理引擎
const physics = cc.director.getPhysicsManager()
physics.enabled = true
physics.gravity = cc.v2(0, -64)
// physics.debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit |
//     cc.PhysicsManager.DrawBits.e_pairBit |
//     cc.PhysicsManager.DrawBits.e_shapeBit

// 关闭 tiledmap 自动裁剪
cc.macro.ENABLE_TILEDMAP_CULLING = false

// 扩展常用
cc.equal = function(i, j, delta) {
    return Math.abs(i - j) <= delta
}